package com.gitee.elead.api;

import com.gitee.elead.api.cons.APICons;
import com.gitee.elead.util.ApplicationUtils;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * API工具类
 *
 * @author luopeng
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public abstract class ApiUtils {

    /**
     * 获取当前用户id
     */
    public static String currentUid() {
    	//session中是否存在
        return (String) ApplicationUtils.getRequest().getAttribute(APICons.API_UID);
    }

}
